//package com.cn.hadoop;
//
//import org.apache.hadoop.io.IntWritable;
//import org.apache.hadoop.io.Text;
//import org.apache.hadoop.mapreduce.Mapper;
//
//import java.io.IOException;
//import java.util.StringTokenizer;
//
//public class MyMapper extends Mapper<Object, Text, Text, IntWritable> {
//    private final IntWritable intWritable = new IntWritable(1);
//    private Text text = new Text();
//
//    @Override
//    protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {
//        StringTokenizer stringTokenizer = new StringTokenizer(value.toString());
//        while (stringTokenizer.hasMoreTokens()) {
//            text.set(stringTokenizer.nextToken());
//            context.write(text, intWritable);
//        }
//    }
//}
